package com.gerryrun.mytestapplication;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.gerryrun.lib_skin.SkinManager;
import com.gerryrun.lib_skin.SkinPreference;

public class MainActivity1 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main1);
    }

    public void change(View view) {
        Log.e("TAG", "change: ");
        if (SkinPreference.getInstance().getSkin().isEmpty()) {

            //换肤，收包裹，皮肤包是独立的apk包，可以来自网络下载
            SkinManager.getInstance()
                    .loadSkin("/data/data/com.gerryrun.mytestapplication/skin/app-debug.apk");
        } else {
            SkinManager.getInstance().loadSkin("");
        }
    }
}